﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Entities;
using DAL;

namespace BLL
{
    public class StationBUS
    {
        public StationBUS()
        {

        }

        public static List<Station> GetStation()
        {
            StationDAL stationDal = new StationDAL();
            List<Station> lst = stationDal.GetAll_Station();
            return lst;
        }

        public static Station GetStation(int StationID)
        {
            StationDAL stationDal = new StationDAL();
            Station obj = stationDal.Get_Station_By_ID(StationID);
            return obj;
        }

        public static DataTable GetAll_Station()
        {
            StationDAL stBus = new StationDAL();
            return stBus.Get_Station_All();
        }

        public static DataTable Search_Station(string Name)
        {
            StationDAL stBus = new StationDAL();
            string sWhere = "StastionName=N'" + Name + "'";
            string sOrderBy = "";
            return stBus.Search_Station(sWhere, sOrderBy);
        }

        public static Station Get_Station_ByID(int stationID)
        {
            StationDAL stBus = new StationDAL();
            return stBus.Get_Station_By_ID(stationID);
        }

        public static bool Insert_Station(Station temp)
        {
            StationDAL ST_DAL = new StationDAL();
            return ST_DAL.Insert_Station(temp);
        }

        public static bool Update_Station(Station temp)
        {
            StationDAL ST_DAL = new StationDAL();
            return ST_DAL.Update_Station(temp);
        }

        public static bool Delete_Station(Station temp)
        {
            StationDAL ST_DAL = new StationDAL();
            return ST_DAL.Delete_Station(temp);
        }

    }
}

